package com.ruoyi.system.domain;

import java.math.BigDecimal;
import java.util.Date;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;

/**
 * 桌台次卡管理对象 table_pass_card_management
 *
 * @author ruoyi
 * @date 2025-05-21
 */
public class TablePassCardManagement extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 自增主键ID，唯一标识每条次卡记录 */
    private Long id;

    /** 次卡名称（如“10次桌台畅玩卡”“周末专享次卡”） */
    @Excel(name = "次卡名称", readConverterExp = "如=“10次桌台畅玩卡”“周末专享次卡”")
    private String passCardName;

    /** 次卡编号（唯一标识，如TPC20230001） */
    @Excel(name = "次卡编号", readConverterExp = "唯=一标识，如TPC20230001")
    private String passCardCode;

    /** 可用总次数（如10次） */
    @Excel(name = "可用总次数", readConverterExp = "如=10次")
    private Integer totalAvailableTimes;

    /** 每日可用次数（0表示不限制，如每日最多使用2次） */
    @Excel(name = "每日可用次数", readConverterExp = "0=表示不限制，如每日最多使用2次")
    private Integer dailyAvailableTimes;

    /** 有效期类型：无限期（unlimited）、按天数（by_days）、按固定日期（by_fixed_date） */
    @Excel(name = "有效期类型：无限期", readConverterExp = "u=nlimited")
    private String validityType;

    /** 按天数有效期（当validity_type为by_days时生效，单位：天） */
    @Excel(name = "按天数有效期", readConverterExp = "当=validity_type为by_days时生效，单位：天")
    private Integer validityDays;

    /** 固定有效期截止日期（当validity_type为by_fixed_date时生效） */
    @Excel(name = "固定有效期截止日期", readConverterExp = "当=validity_type为by_fixed_date时生效")
    private Date fixedExpiryDate;

    /** 售价（单位：元） */
    @Excel(name = "售价", readConverterExp = "单=位：元")
    private BigDecimal salePrice;

    /** 原价（用于展示折扣，单位：元） */
    @Excel(name = "原价", readConverterExp = "用=于展示折扣，单位：元")
    private BigDecimal originalPrice;

    /** 状态：待上架（pending_launch）、已上架（launched）、已下架（discontinued） */
    @Excel(name = "状态：待上架", readConverterExp = "p=ending_launch")
    private String status;

    /** 卡面设置（JSON格式，包含颜色、自定义图片URL等，示例：{"color":"#FF5722","custom_image":"https://example.com/pass_card.png"}） */
    @Excel(name = "卡面设置", readConverterExp = "J=SON格式，包含颜色、自定义图片URL等")
    private String cardFaceDesign;

    /** 购买限制（JSON格式，支持多条件组合，示例：{"online_purchase":true,"points_exchange":true,"max_purchase_per_user":3}） */
    @Excel(name = "购买限制", readConverterExp = "J=SON格式，支持多条件组合")
    private String purchaseLimit;

    /** 参与积分规则：不参与（exclude）、参与积分（include） */
    @Excel(name = "参与积分规则：不参与", readConverterExp = "e=xclude")
    private String pointsParticipation;

    /** 暂停限制类型：不限制（unlimited）、最多暂停几次（limited） */
    @Excel(name = "暂停限制类型：不限制", readConverterExp = "u=nlimited")
    private String pauseLimitType;

    /** 最多暂停次数（当pause_limit_type为limited时生效，0表示不限制，如最多暂停3次） */
    @Excel(name = "最多暂停次数", readConverterExp = "当=pause_limit_type为limited时生效，0表示不限制，如最多暂停3次")
    private Integer maxPauseTimes;

    /** 使用日期限制（JSON格式，示例：{"weekday_availability":["MON","TUE","WED","THU","FRI"],"custom_dates":["2023-12-24","2024-02-14"]}） */
    @Excel(name = "使用日期限制", readConverterExp = "J=SON格式")
    private String usageDateRestrictions;

    /** 使用时间限制（JSON格式，示例：{"start_time":"09:00","end_time":"21:00"}） */
    @Excel(name = "使用时间限制", readConverterExp = "J=SON格式")
    private String usageTimeRestrictions;

    /** 是否参与会员折扣（1=参与，0=不参与） */
    @Excel(name = "是否参与会员折扣", readConverterExp = "1==参与，0=不参与")
    private Integer memberDiscountEligible;

    /** 剩余可使用次数（系统自动维护，初始值为total_available_times，用户消费时递减） */
    @Excel(name = "剩余可使用次数", readConverterExp = "系=统自动维护，初始值为total_available_times，用户消费时递减")
    private Integer remainingUsageTimes;

    /** 手机号 */
    @Excel(name = "手机号")
    private String phone;

    public void setId(Long id)
    {
        this.id = id;
    }

    public Long getId()
    {
        return id;
    }

    public void setPassCardName(String passCardName)
    {
        this.passCardName = passCardName;
    }

    public String getPassCardName()
    {
        return passCardName;
    }

    public void setPassCardCode(String passCardCode)
    {
        this.passCardCode = passCardCode;
    }

    public String getPassCardCode()
    {
        return passCardCode;
    }

    public void setTotalAvailableTimes(Integer totalAvailableTimes)
    {
        this.totalAvailableTimes = totalAvailableTimes;
    }

    public Integer getTotalAvailableTimes()
    {
        return totalAvailableTimes;
    }

    public void setDailyAvailableTimes(Integer dailyAvailableTimes)
    {
        this.dailyAvailableTimes = dailyAvailableTimes;
    }

    public Integer getDailyAvailableTimes()
    {
        return dailyAvailableTimes;
    }

    public void setValidityType(String validityType)
    {
        this.validityType = validityType;
    }

    public String getValidityType()
    {
        return validityType;
    }

    public void setValidityDays(Integer validityDays)
    {
        this.validityDays = validityDays;
    }

    public Integer getValidityDays()
    {
        return validityDays;
    }

    public void setFixedExpiryDate(Date fixedExpiryDate)
    {
        this.fixedExpiryDate = fixedExpiryDate;
    }

    public Date getFixedExpiryDate()
    {
        return fixedExpiryDate;
    }

    public void setSalePrice(BigDecimal salePrice)
    {
        this.salePrice = salePrice;
    }

    public BigDecimal getSalePrice()
    {
        return salePrice;
    }

    public void setOriginalPrice(BigDecimal originalPrice)
    {
        this.originalPrice = originalPrice;
    }

    public BigDecimal getOriginalPrice()
    {
        return originalPrice;
    }

    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }

    public void setCardFaceDesign(String cardFaceDesign)
    {
        this.cardFaceDesign = cardFaceDesign;
    }

    public String getCardFaceDesign()
    {
        return cardFaceDesign;
    }

    public void setPurchaseLimit(String purchaseLimit)
    {
        this.purchaseLimit = purchaseLimit;
    }

    public String getPurchaseLimit()
    {
        return purchaseLimit;
    }

    public void setPointsParticipation(String pointsParticipation)
    {
        this.pointsParticipation = pointsParticipation;
    }

    public String getPointsParticipation()
    {
        return pointsParticipation;
    }

    public void setPauseLimitType(String pauseLimitType)
    {
        this.pauseLimitType = pauseLimitType;
    }

    public String getPauseLimitType()
    {
        return pauseLimitType;
    }

    public void setMaxPauseTimes(Integer maxPauseTimes)
    {
        this.maxPauseTimes = maxPauseTimes;
    }

    public Integer getMaxPauseTimes()
    {
        return maxPauseTimes;
    }

    public void setUsageDateRestrictions(String usageDateRestrictions)
    {
        this.usageDateRestrictions = usageDateRestrictions;
    }

    public String getUsageDateRestrictions()
    {
        return usageDateRestrictions;
    }

    public void setUsageTimeRestrictions(String usageTimeRestrictions)
    {
        this.usageTimeRestrictions = usageTimeRestrictions;
    }

    public String getUsageTimeRestrictions()
    {
        return usageTimeRestrictions;
    }

    public void setMemberDiscountEligible(Integer memberDiscountEligible)
    {
        this.memberDiscountEligible = memberDiscountEligible;
    }

    public Integer getMemberDiscountEligible()
    {
        return memberDiscountEligible;
    }

    public void setRemainingUsageTimes(Integer remainingUsageTimes)
    {
        this.remainingUsageTimes = remainingUsageTimes;
    }

    public Integer getRemainingUsageTimes()
    {
        return remainingUsageTimes;
    }

    public void setPhone(String phone)
    {
        this.phone = phone;
    }

    public String getPhone()
    {
        return phone;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("passCardName", getPassCardName())
                .append("passCardCode", getPassCardCode())
                .append("totalAvailableTimes", getTotalAvailableTimes())
                .append("dailyAvailableTimes", getDailyAvailableTimes())
                .append("validityType", getValidityType())
                .append("validityDays", getValidityDays())
                .append("fixedExpiryDate", getFixedExpiryDate())
                .append("salePrice", getSalePrice())
                .append("originalPrice", getOriginalPrice())
                .append("status", getStatus())
                .append("cardFaceDesign", getCardFaceDesign())
                .append("purchaseLimit", getPurchaseLimit())
                .append("pointsParticipation", getPointsParticipation())
                .append("pauseLimitType", getPauseLimitType())
                .append("maxPauseTimes", getMaxPauseTimes())
                .append("usageDateRestrictions", getUsageDateRestrictions())
                .append("usageTimeRestrictions", getUsageTimeRestrictions())
                .append("memberDiscountEligible", getMemberDiscountEligible())
                .append("remainingUsageTimes", getRemainingUsageTimes())
                .append("createTime", getCreateTime())
                .append("updateTime", getUpdateTime())
                .append("phone", getPhone())
                .toString();
    }
}
